<form action="index.php" method="post" name="adminForm">
  <table class="adminlist">
    <thead>
      <tr>
        <th width="20">
          <input type="checkbox" name="toggle" value="" onclick="checkAll(<?= count($this->stats); ?>);" />
        </th>
        <th class="title"><?= JHTML::_( 'grid.sort', 'Team', 'team', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="15%"><?= JHTML::_( 'grid.sort', 'Schedule', 'schedule', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="10%"><?= JHTML::_( 'grid.sort', 'Final Score', 'final_score', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Field Goals', 'field_goals', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Three Points', 'three_points', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Free Throws', 'free_throws', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Off Rebounds', 'off_rebounds', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Def Rebounds', 'def_rebounds', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Assists', 'assists', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Steals', 'steals', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Blocks', 'blocks', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Overtime', 'is_overtime', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Published', 'published', $this->lists['order_Dir'], $this->lists['order']); ?></th>
      </tr>
    </thead>  
    <?php
      jimport('joomla.filter.output');
      for($i=0; $i< count($this->stats); $i++)
      {
        $stat       = &$this->stats[$i];
        $checked    = JHTML::_('grid.id', $i, $stat->id);
        $published    = JHTML::_('grid.published', $stat, $i);
        $link      = 'index.php?option=' . $option . '&task=edit&c=teamgamestat&cid[]='. $stat->id;
        
        $team        = $stat->team;
        $schedule    = $stat->schedule;
        $final_score = $stat->final_score;
        $field_goals = $stat->field_goals;
        $three_points= $stat->three_points;
        $free_throws = $stat->free_throws;
        $off_rebounds= $stat->off_rebounds;
        $def_rebounds= $stat->def_rebounds;
        $assists     = $stat->assists;
        $steals      = $stat->steals;
        $blocks      = $stat->blocks;
        if($stat->is_overtime)
          $overtime    = JHTML::_('image','images/tick.png', 'yes');
        else
          $overtime    = JHTML::_('image','images/publish_x.png', 'no');
    ?>
      <tr>
        <td>
          <?= $checked; ?>
        </td>
        <td>
          <a href="<?= $link; ?>"><?= $team ?></a>
        </td>
        <td>
          <?= $schedule ?>
        </td>
        <td>
          <?= $final_score ?>
        </td>
        <td>
          <?= $field_goals ?>
        </td>
        <td>
          <?= $three_points ?>
        </td>
        <td>
          <?= $free_throws ?>
        </td>
        <td>
          <?= $off_rebounds ?>
        </td>
        <td>
          <?= $def_rebounds ?>
        </td>
        <td>
          <?= $assists ?>
        </td>
        <td>
          <?= $steals ?>
        </td>
        <td>
          <?= $blocks ?>
        </td>
        <td>
          <?= $overtime ?>
        </td>
        <td>
          <?= $published ?>
        </td>
      </tr>
    <?php
      }
    ?>
    <tr>
      <td colspan="14"><?= $this->pagination->getListFooter(); ?></td>
    </tr>
  </table>
  <input type="hidden" name="option" value="<?= JRequest::getVar( 'option' );?>"/>
  <input type="hidden" name="c" value="<?= JRequest::getVar('c', 'venue'); ?>" />
    <input type="hidden" name="task" value=""/>
    <input type="hidden" name="boxchecked" value="0"/>      
  <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
  <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>